extends layout
append scripts
    script.
        Messenger().post("Welcome to the darkside (tm)")  // 直接弹出
        Messenger().post({ message: "How's it going?", type: "error" })  // 定义类型, 会是红色的提示
        message = Messenger().post("Calculating position")
        message.update({ type: "error", message: "Error calculating position" })  // 可以进行修改
        // Action 配置
        msg = Messenger().post({
            message: "Are you sure you'd like to delete this contact?",
            actions: {
                delete: {
                    label: "Delete",
                    action: function(){ msg.hide() }
                },
                cancel: {
                    action: function(){ msg.hide() }
                }
            }
        })
        // Events 配置
        Messenger().post({
            message: "Click me to explode!",
            events: {
                "click": function(e){ explode(); },  // 点击触发函数
                "hover a.button": function(e){ e.stopPropagation(); }  // 鼠标放上去会改变形状
            }
        });
        // 还有很多配置, 见 http://github.hubspot.com/messenger/
block content
